<div class="wrap">

	<div id="ajaxResponse" class="ajaxResponse">{if $smarty.cookies.message != NULL}{$smarty.cookies.message}{/if}</div>

<h2>Choose Slide Gallery Management</h2>
<p>
	<a href="?{$smarty.server.QUERY_STRING}&amp;act=newgallery"><img src="../view/admin/images/object_create.png" alt="Create" /></a>
</p>
	<table class="widefat">
		<thead>
		<tr>
			<th scope="col" style="text-align: center">{TranslateTag}B_LABEL_ID{/TranslateTag}</th>
	        <th scope="col">{TranslateTag}B_LABEL_NAME{/TranslateTag}</th>
            <th scope="col">Slide Type</th>
            <th scope="col">{TranslateTag}B_LABEL_DESCRIPTION{/TranslateTag}</th>
	        <th colspan="3" style="text-align: center">{TranslateTag}B_LABEL_ACTION{/TranslateTag}</th>
		</tr>
		</thead>
		<tbody id="row_gallery">
			{foreach name=cat from=$GALLERY.list item=item}
				<tr id="row-{$item->gallery_id}" class="{cycle values=,alternate}">
					<th scope='row' style='text-align: center' valign="middle">
                    	{$item->gallery_id}
                    </th>
					<td valign="middle">
                    	<a href="?module=BgcmsGallery&sub1=gallery&act=listphotos&galleryid={$item->gallery_id}">{$item->gallery_name}</a>
                     </td>
                     <td valign="middle">
                    	{$item->name_slide}
                    </td>
                     <td valign="middle">
                     	{$item->description}
                     </td>
					<td><a href="?{$smarty.server.QUERY_STRING}&amp;act=editgallery&id={$item->gallery_id}" class='edit'>Edit</a></td>
					<td><a onclick="onDeleteGallery('?{$smarty.server.QUERY_STRING}', '{$item->gallery_id}','ajaxResponse','gallery')" class='delete'>Delete</a></td>
				</tr>
			{/foreach}
		</tbody>
	</table>
	<p>
		<a href="?{$smarty.server.QUERY_STRING}&amp;act=newgallery"><img src="../view/admin/images/object_create.png" alt="Create" /></a>
	</p>
	{if $GALLERY.list != NULL}
    <div>			
              <div style="width:300px; float:left"> 
                  {TranslateTag}LABEL_PAGES{/TranslateTag} : {$GALLERY.TOTAL} {TranslateTag}LABEL_OF{/TranslateTag} {$GALLERY.TOTALDATA}
              </div>			
              <div style="width:300px; text-align:right; float:right" >{$GALLERY.FIRST} {$GALLERY.PRE}&nbsp;{$GALLERY.LISTPAGE} {TranslateTag}LABEL_OF{/TranslateTag} &nbsp; {$GALLERY.TOTALPAGE} &nbsp;                   
                  <select onchange="javascript:window.location='{$GALLERY.LINK}&{$GALLERY.PATHNAME}='+this.value">
                    {$GALLERY.COMBOPAGE}                     
                  </select>&nbsp;{$GALLERY.NEXT} {$GALLERY.LAST}         
              </div>
              <div style="clear:both"></div>		
    </div>	     
    {/if}
</div>

